<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        a {
            /*清除下划线*/
            text-decoration: none;
        }
        a:link {
            color: deeppink;
        }
        a:visited {
            color: pink;
        }
        /*link visited只能在连接上用 链接伪类*/
        #test:link {
            background: pink;
        }
        div:not(#test) {
            width: 280px;
            height: 200px;
            background: pink;
            display: none;
            text-align: center;
            font: 20px/200px '微软雅黑';
        }
        :target {
            display: block;
        }
    </style>
</head>
<body>
    <a href="#">点我</a>
    <div id="test">div点我</div>
    <hr/>
    <a href="#div1">div1</a>
    <a href="#div2">div2</a>
    <a href="#div3">div3</a>
    <div id="div1">div1</div>
    <div id="div2">div2</div>
    <div id="div3">div3</div>
</body>
</html>
